import React, { Component } from 'react'
import './Dialog.scss'
export default class Dialog extends Component {
  static defaultProps={
    headerColor:'#ccc'
  }
  render() {
    console.log(this);
    const {title,headerColor,children}=this.props
    return (
      <div className='dialog-container'>
         <div className='dialog-header' style={{backgroundColor:headerColor}}>
            <div>{title}</div>
            <div onClick={()=>{
                this.props.close()
            }}>&times;</div>
         </div>
         <div className='dialog-main'>
            {children}
         </div>
      </div>
    )
  }
}
